package com.zou.baidu_music_radio.utils;

import com.google.gson.Gson;
import com.zou.baidu_music_radio.bean.Hotsongsbean;
import com.zou.baidu_music_radio.bean.SongsBean;

/**
 * Created by zou on 2016/3/2.
 */
public class MyParser {

    private static Gson gson = null;

    public MyParser() {
    }

    public static Hotsongsbean parse(String jsonString) {
        gson = new Gson();
        return gson.fromJson(jsonString, Hotsongsbean.class);
    }

    /**
     * @param jsonString 歌曲详情json字符串
     * @return SongBean对象
     */
    public static SongsBean parseSongInfo(String jsonString) {
        if (gson == null) {
            gson = new Gson();
        }
        return gson.fromJson(jsonString, SongsBean.class);
    }


}
